package com.system.validation;

import com.system.anno.Occupancy;
import com.system.anno.Sex;
import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;

public class OccupancyVlidation implements ConstraintValidator<Occupancy,String> {
    @Override
    public boolean isValid(String s, ConstraintValidatorContext constraintValidatorContext) {
        if(s == null){
            return false;
        }
        if(s.equals("已入住") || s.equals("未入住")){
            return true;
        }
        return false;
    }
}
